package com.web.model;

import java.io.Serializable;
import java.util.Date;
import org.hibernate.validator.constraints.NotEmpty;

/**
* @author yangguanzan
* @date 2020-10-19
* @description
*/
public class UserInfo implements Serializable {

    private static final long serialVersionUID = 2176859564503162717L;
    /**
     * 主键ID
     */
    private Long id;
    /**
     * 编号
     */
    @NotEmpty
    private String code;
    /**
     * 昵称
     */
    @NotEmpty
    private String nickName;
    /**
     * 头像链接
     */
    private String avatarUrl;
    /**
     * 性别 0：未知、1：男、2：女
     */
    private Integer gender;

    /**
     * 省份
     */
    private String province;
    /**
     * 城市
     */
    private String city;

    /**
     * 国家
     */
    private String country;
    /**
     * 创建时间
     */
    private Date createdDt;
    /**
     * 修改时间
     */
    private Date modifiedDt;

    public Date getCreatedDt() {
        return createdDt;
    }

    public void setCreatedDt(Date createdDt) {
        this.createdDt = createdDt;
    }

    public Date getModifiedDt() {
        return modifiedDt;
    }

    public void setModifiedDt(Date modifiedDt) {
        this.modifiedDt = modifiedDt;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getNickName() {
        return nickName;
    }

    public void setNickName(String nickName) {
        this.nickName = nickName;
    }

    public String getAvatarUrl() {
        return avatarUrl;
    }

    public void setAvatarUrl(String avatarUrl) {
        this.avatarUrl = avatarUrl;
    }

    public Integer getGender() {
        return gender;
    }

    public void setGender(Integer gender) {
        this.gender = gender;
    }

    public String getProvince() {
        return province;
    }

    public void setProvince(String province) {
        this.province = province;
    }

    public String getCity() {
        return city;
    }

    public void setCity(String city) {
        this.city = city;
    }

    public String getCountry() {
        return country;
    }

    public void setCountry(String country) {
        this.country = country;
    }


    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }


    public UserInfo() {
        //no do
    }

    @Override
    public String toString() {
        return "UserInfo{" +
            "id=" + id +
            ", code='" + code + '\'' +
            ", nickName='" + nickName + '\'' +
            ", avatarUrl='" + avatarUrl + '\'' +
            ", gender=" + gender +
            ", province='" + province + '\'' +
            ", city='" + city + '\'' +
            ", country='" + country + '\'' +
            ", createdDt=" + createdDt +
            ", modifiedDt=" + modifiedDt +
            '}';
    }

    public void init(){
        System.out.println("userInfo已经初始化");
    }

    public void destory(){
        System.out.println("userInfo对象被销毁了");
    }
}
